//
//  UIDevice+ZXDeviceName.m
//  Runner
//
//  Created by simon on 2020/11/23.
//  https://theapplewiki.com/wiki/List_of_Apple_Watches

#import "UIDevice+ZXDeviceName.h"
//设备类型
#import "sys/utsname.h"

@implementation UIDevice (ZXDeviceName)


#pragma mark - Device

- (NSString *)zx_getDeviceModelInfo
{
    struct utsname systemInfo;
    uname(&systemInfo);
    NSString *device_model = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
    return device_model;
}

/// 获取设备类型名称；笔记theiphonewiki.com/wiki/Models
- (NSString *)zx_getDeviceName
{
    NSString *deviceString = [self zx_getDeviceModelInfo];
    
    // 1.模拟器
    if ([deviceString isEqualToString:@"i386"])     return @"iPhone Simulator";
    if ([deviceString isEqualToString:@"x86_64"])   return @"iPhone Simulator x86_64";
    // M芯片默认模拟器
    if ([deviceString isEqualToString:@"arm64"])    return @"iPhone Simulator arm64";
    
    
    
    // 2.Apple Watch
    
    // 2015年 Apple Watch (1st generation);
    // 操作系统iOS 8.2; iOS 8.2 or later running on an iPhone 5 or newer
    if ([deviceString isEqualToString:@"Watch1,1"])      return @"Apple Watch (1st generation)";
    if ([deviceString isEqualToString:@"Watch1,2"])      return @"Apple Watch (1st generation)";
    
    // 2016年 
    // 操作系统iOS 10.0; iOS 10 or later running on an iPhone 5 or newer
    // Apple Watch Series 1;
    if ([deviceString isEqualToString:@"Watch2,6"])     return @"Apple Watch Series 1";
    if ([deviceString isEqualToString:@"Watch2,7"])     return @"Apple Watch Series 1";
    
    // Apple Watch Series 2;
    if ([deviceString isEqualToString:@"Watch2,3"])     return @"Apple Watch Series 2";
    if ([deviceString isEqualToString:@"Watch2,4"])     return @"Apple Watch Series 2";
    
    // 2017年 
    // Apple Watch Series 3;
    // 操作系统iOS 11.0; iOS 11 or later running on an iPhone 6 or newer
    if ([deviceString isEqualToString:@"Watch3,1"])     return @"Apple Watch Series 3";
    if ([deviceString isEqualToString:@"Watch3,2"])     return @"Apple Watch Series 3";
    if ([deviceString isEqualToString:@"Watch3,3"])     return @"Apple Watch Series 3";
    if ([deviceString isEqualToString:@"Watch3,4"])     return @"Apple Watch Series 3";

    // 2018年 
    // Apple Watch Series 4;
    // 操作系统iOS 12.0;  iOS 12 or later running on an iPhone 6 or newer
    if ([deviceString isEqualToString:@"Watch4,1"])     return @"Apple Watch Series 4";
    if ([deviceString isEqualToString:@"Watch4,2"])     return @"Apple Watch Series 4";
    if ([deviceString isEqualToString:@"Watch4,3"])     return @"Apple Watch Series 4";
    if ([deviceString isEqualToString:@"Watch4,4"])     return @"Apple Watch Series 4";

    // 2019年 
    // Apple Watch Series 5;
    // 操作系统iOS 13.0;  iOS 13 or later running on an iPhone 6s or newer
    if ([deviceString isEqualToString:@"Watch5,1"])     return @"Apple Watch Series 5";
    if ([deviceString isEqualToString:@"Watch5,2"])     return @"Apple Watch Series 5";
    if ([deviceString isEqualToString:@"Watch5,3"])     return @"Apple Watch Series 5";
    if ([deviceString isEqualToString:@"Watch5,4"])     return @"Apple Watch Series 5";

    // 2020年 
    // 操作系统iOS 14.0; iOS 14 or later running on an iPhone 6s or newer
    // Apple Watch SE 1代;
    if ([deviceString isEqualToString:@"Watch5,9"])     return @"Apple Watch SE 1";
    if ([deviceString isEqualToString:@"Watch5,10"])     return @"Apple Watch SE 1";
    if ([deviceString isEqualToString:@"Watch5,11"])     return @"Apple Watch SE 1";
    if ([deviceString isEqualToString:@"Watch5,12"])     return @"Apple Watch SE 1";

    // Apple Watch Series 6;
    if ([deviceString isEqualToString:@"Watch6,1"])     return @"Apple Watch Series 6";
    if ([deviceString isEqualToString:@"Watch6,2"])     return @"Apple Watch Series 6";
    if ([deviceString isEqualToString:@"Watch6,3"])     return @"Apple Watch Series 6";
    if ([deviceString isEqualToString:@"Watch6,4"])     return @"Apple Watch Series 6";

    // 2021年 
    // Apple Watch Series 7;
    // 操作系统iOS 15.0; iOS 15 on iPhone 6s or later
    if ([deviceString isEqualToString:@"Watch6,6"])     return @"Apple Watch Series 7";
    if ([deviceString isEqualToString:@"Watch6,7"])     return @"Apple Watch Series 7";
    if ([deviceString isEqualToString:@"Watch6,8"])     return @"Apple Watch Series 7";
    if ([deviceString isEqualToString:@"Watch6,9"])     return @"Apple Watch Series 7";
    
    // 2022年
    // 操作系统iOS 16;iOS 16 or later running on an iPhone 8 or newer
    // Apple Watch SE(2nd generation)
    if ([deviceString isEqualToString:@"Watch6,10"])     return @"Apple Watch SE(2nd generation)";
    if ([deviceString isEqualToString:@"Watch6,11"])     return @"Apple Watch SE(2nd generation)";
    if ([deviceString isEqualToString:@"Watch6,12"])     return @"Apple Watch SE(2nd generation)";
    if ([deviceString isEqualToString:@"Watch6,13"])     return @"Apple Watch SE(2nd generation)";
    // Apple Watch Series 8;
    if ([deviceString isEqualToString:@"Watch6,14"])     return @"Apple Watch Series 8";
    if ([deviceString isEqualToString:@"Watch6,15"])     return @"Apple Watch Series 8";
    if ([deviceString isEqualToString:@"Watch6,16"])     return @"Apple Watch Series 8";
    if ([deviceString isEqualToString:@"Watch6,17"])     return @"Apple Watch Series 8";
    // Apple Watch Ultra；
    if ([deviceString isEqualToString:@"Watch6,18"])     return @"Apple Watch Ultra";
    
    // 2023年
    // 操作系统iOS 17; 兼容：iOS 17 on iPhone XS or later
    // Series 9
    if ([deviceString isEqualToString:@"Watch7,1"])     return @"Apple Watch Series 9";
    if ([deviceString isEqualToString:@"Watch7,2"])     return @"Apple Watch Series 9";
    if ([deviceString isEqualToString:@"Watch7,3"])     return @"Apple Watch Series 9";
    if ([deviceString isEqualToString:@"Watch7,4"])     return @"Apple Watch Series 9";
    // Apple Watch Ultra 2；
    if ([deviceString isEqualToString:@"Watch7,5"])     return @"Apple Watch Ultra 2";
    
    // 2024年
    // 操作系统iOS 18；兼容iOS 18 on iPhone XS or later;
    // Series 10
    if ([deviceString isEqualToString:@"Watch7,8"])     return @"Apple Watch Series 10";
    if ([deviceString isEqualToString:@"Watch7,9"])     return @"Apple Watch Series 10";
    if ([deviceString isEqualToString:@"Watch7,10"])     return @"Apple Watch Series 10";
    if ([deviceString isEqualToString:@"Watch7,11"])     return @"Apple Watch Series 10";
   
    
    // 3.iPad
    
    if ([deviceString isEqualToString:@"iPad1,1"])      return @"iPad";
    
    if ([deviceString isEqualToString:@"iPad2,1"])      return @"iPad 2";
    if ([deviceString isEqualToString:@"iPad2,2"])      return @"iPad 2";
    if ([deviceString isEqualToString:@"iPad2,3"])      return @"iPad 2";
    if ([deviceString isEqualToString:@"iPad2,4"])      return @"iPad 2";

    if ([deviceString isEqualToString:@"iPad3,1"])      return @"iPad 3";
    if ([deviceString isEqualToString:@"iPad3,2"])      return @"iPad 3";
    if ([deviceString isEqualToString:@"iPad3,3"])      return @"iPad 3";
    
    if ([deviceString isEqualToString:@"iPad3,4"])      return @"iPad 4";
    if ([deviceString isEqualToString:@"iPad3,5"])      return @"iPad 4";
    if ([deviceString isEqualToString:@"iPad3,6"])      return @"iPad 4";
    
    if ([deviceString isEqualToString:@"iPad6,11"])    return @"iPad 5";
    if ([deviceString isEqualToString:@"iPad6,12"])    return @"iPad 5";
    
    if ([deviceString isEqualToString:@"iPad7,5"])  return @"iPad 6";
    if ([deviceString isEqualToString:@"iPad7,6"])  return @"iPad 6";
    
    if ([deviceString isEqualToString:@"iPad7,11"])  return @"iPad 7";
    if ([deviceString isEqualToString:@"iPad7,12"])  return @"iPad 7";
    // 2020年 操作系统iOS 14.0
    if ([deviceString isEqualToString:@"iPad11,6"])  return @"iPad 8";
    if ([deviceString isEqualToString:@"iPad11,7"])  return @"iPad 8";
    // 2021年 操作系统iOS 15.0
    if ([deviceString isEqualToString:@"iPad12,1"])  return @"iPad 9";
    if ([deviceString isEqualToString:@"iPad12,2"])  return @"iPad 9";

    // 2023年-10
    // iPad 10；操作系统iOS 16.0
    if ([deviceString isEqualToString:@"iPad13,18"])  return @"iPad 10";
    if ([deviceString isEqualToString:@"iPad13,19"])  return @"iPad 10";
    
    // 2025-03
    // iPad A16；
    if ([deviceString isEqualToString:@"iPad15,7"])  return @"iPad A16";
    if ([deviceString isEqualToString:@"iPad15,8"])  return @"iPad A16";


    
    // 4.iPad Air
    
    if ([deviceString isEqualToString:@"iPad4,1"])     return @"iPad Air 1";
    if ([deviceString isEqualToString:@"iPad4,2"])     return @"iPad Air 1";
    if ([deviceString isEqualToString:@"iPad4,3"])     return @"iPad Air 1";
    
    if ([deviceString isEqualToString:@"iPad5,3"])     return @"iPad Air 2(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad5,4"])     return @"iPad Air 2(Wi-Fi+Cellular)";
    
    if ([deviceString isEqualToString:@"iPad11,3"])    return @"iPad Air 3(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad11,4"])    return @"iPad Air 3(Wi-Fi+Cellular)";
    
    // 2020年9月
    // iPad Air 4
    if ([deviceString isEqualToString:@"iPad13,1"])    return @"iPad Air 4(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad13,2"])    return @"iPad Air 4(Wi-Fi+Cellular)";
    
    // 2022年3月
    // iPad Air 5；Apple M1 CPU
    if ([deviceString isEqualToString:@"iPad13,16"])    return @"iPad Air 5(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad13,17"])    return @"iPad Air 5(Wi-Fi+Cellular)";

    // 2024年5月
    // iPad Air 6 M2(11″ 13″)
    // iPad Air 11-inch(M2)；Apple M2 CPU
    if ([deviceString isEqualToString:@"iPad14,8"])    return @"iPad Air 11-inch(M2)(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad14,9"])    return @"iPad Air 11-inch(M2)(Wi-Fi+Cellular)";
    // iPad Air 13-inch(M2)；Apple M2 CPU
    if ([deviceString isEqualToString:@"iPad14,10"])    return @"iPad Air 11-inch(M2)(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad14,11"])    return @"iPad Air 11-inch(M2)(Wi-Fi+Cellular)";

    // 2025年3月
    // iPad Air 7 M3(11″ 13″)
    // iPad Air 11-inch(M3)；Apple M3 CPU
    if ([deviceString isEqualToString:@"iPad15,3"])    return @"iPad Air 11-inch(M3)(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad15,4"])    return @"iPad Air 11-inch(M3)(Wi-Fi+Cellular)";
    // iPad Air 13-inch(M3)；Apple M3 CPU
    if ([deviceString isEqualToString:@"iPad15,5"])    return @"iPad Air 11-inch(M3)(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad15,6"])    return @"iPad Air 11-inch(M3)(Wi-Fi+Cellular)";

    
    // 5.iPad Pro
    // 12.9-inch：1、2、3、4、5、6
    // 9.7-inch：1
    // 10.5-inch：1
    // 11-inch：1、2、3、4
    
    // 2015年 9月
    if ([deviceString isEqualToString:@"iPad6,7"])     return @"iPad Pro (12.9-inch) 1";
    if ([deviceString isEqualToString:@"iPad6,8"])     return @"iPad Pro (12.9-inch) 1";
    
    // 2016年 3月
    if ([deviceString isEqualToString:@"iPad6,3"])     return @"iPad Pro (9.7-inch) 1";
    if ([deviceString isEqualToString:@"iPad6,4"])     return @"iPad Pro (9.7-inch) 1";
    
    // 2017年 6月
    if ([deviceString isEqualToString:@"iPad7,1"])     return @"iPad Pro (12.9-inch) 2";
    if ([deviceString isEqualToString:@"iPad7,2"])     return @"iPad Pro (12.9-inch) 2";

    if ([deviceString isEqualToString:@"iPad7,3"])     return @"iPad Pro (10.5-inch)";
    if ([deviceString isEqualToString:@"iPad7,4"])     return @"iPad Pro (10.5-inch)";
    
    // 2018年 10月
    if ([deviceString isEqualToString:@"iPad8,1"])      return @"iPad Pro (11-inch) 1";
    if ([deviceString isEqualToString:@"iPad8,2"])      return @"iPad Pro (11-inch) 1";
    if ([deviceString isEqualToString:@"iPad8,3"])      return @"iPad Pro (11-inch) 1";
    if ([deviceString isEqualToString:@"iPad8,4"])      return @"iPad Pro (11-inch) 1";
    
    if ([deviceString isEqualToString:@"iPad8,5"])      return @"iPad Pro (12.9-inch) 3";
    if ([deviceString isEqualToString:@"iPad8,6"])      return @"iPad Pro (12.9-inch) 3";
    if ([deviceString isEqualToString:@"iPad8,7"])      return @"iPad Pro (12.9-inch) 3";
    if ([deviceString isEqualToString:@"iPad8,8"])      return @"iPad Pro (12.9-inch) 3";
    
    // 2020年3月
    if ([deviceString isEqualToString:@"iPad8,9"])      return @"iPad Pro (11-inch) 2";
    if ([deviceString isEqualToString:@"iPad8,10"])     return @"iPad Pro (11-inch) 2";
    if ([deviceString isEqualToString:@"iPad8,11"])     return @"iPad Pro (12.9-inch) 4";
    if ([deviceString isEqualToString:@"iPad8,12"])     return @"iPad Pro (12.9-inch) 4";
    
    
    // 2021年4月 操作系统iOS 15.0
    if ([deviceString isEqualToString:@"iPad13,4"])      return @"iPad Pro (11-inch) 3";
    if ([deviceString isEqualToString:@"iPad13,5"])      return @"iPad Pro (11-inch) 3";
    if ([deviceString isEqualToString:@"iPad13,6"])      return @"iPad Pro (11-inch) 3";
    if ([deviceString isEqualToString:@"iPad13,7"])      return @"iPad Pro (11-inch) 3";

    if ([deviceString isEqualToString:@"iPad13,8"])     return @"iPad Pro (12.9-inch) 5(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad13,9"])     return @"iPad Pro (12.9-inch) 5(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad13,10"])     return @"iPad Pro (12.9-inch) 5(Wi-Fi+Cellular)";
    if ([deviceString isEqualToString:@"iPad13,11"])     return @"iPad Pro (12.9-inch) 5(Wi-Fi+Cellular)";

    // 2022年10月
    if ([deviceString isEqualToString:@"iPad14,3"])      return @"iPad Pro (11-inch) 4";
    if ([deviceString isEqualToString:@"iPad14,4"])      return @"iPad Pro (11-inch) 4";
    
    if ([deviceString isEqualToString:@"iPad14,5"])     return @"iPad Pro (12.9-inch) 6";
    if ([deviceString isEqualToString:@"iPad14,6"])     return @"iPad Pro (12.9-inch) 6";
  
    // 2024年5月
    // iPad Pro M4(11″ 13″)
    // iPad Pro 11-inch(M4)；Apple M4 CPU
    if ([deviceString isEqualToString:@"iPad16,3"])    return @"iPad Air 11-inch(M4)(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad16,4"])    return @"iPad Air 11-inch(M4)(Wi-Fi+Cellular)";
    // iPad Air 13-inch(M4)；
    if ([deviceString isEqualToString:@"iPad16,5"])    return @"iPad Air 13-inch(M4)(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad16,6"])    return @"iPad Air 13-inch(M4)(Wi-Fi+Cellular)";

    
    // 6.iPad mini
    
    if ([deviceString isEqualToString:@"iPad2,5"])      return @"iPad Mini 1";
    if ([deviceString isEqualToString:@"iPad2,6"])      return @"iPad Mini 1";
    if ([deviceString isEqualToString:@"iPad2,7"])      return @"iPad Mini 1";
    
    if ([deviceString isEqualToString:@"iPad4,4"])      return @"iPad Mini 2";
    if ([deviceString isEqualToString:@"iPad4,5"])      return @"iPad Mini 2";
    if ([deviceString isEqualToString:@"iPad4,6"])      return @"iPad Mini 2";
    
    if ([deviceString isEqualToString:@"iPad4,7"])      return @"iPad Mini 3";
    if ([deviceString isEqualToString:@"iPad4,8"])      return @"iPad Mini 3";
    if ([deviceString isEqualToString:@"iPad4,9"])      return @"iPad Mini 3";
    
    if ([deviceString isEqualToString:@"iPad5,1"])      return @"iPad Mini 4";
    if ([deviceString isEqualToString:@"iPad5,2"])      return @"iPad Mini 4";
    
    if ([deviceString isEqualToString:@"iPad11,1"])     return @"iPad mini 5";
    if ([deviceString isEqualToString:@"iPad11,2"])     return @"iPad mini 5";
    // 2021年9月 操作系统iOS 15.0
    if ([deviceString isEqualToString:@"iPad14,1"])     return @"iPad mini 6";
    if ([deviceString isEqualToString:@"iPad14,2"])     return @"iPad mini 6";
    // 2024年10月
    // iPad mini (A17 Pro)
    if ([deviceString isEqualToString:@"iPad16,1"])    return @"iPad mini(A17 Pro)(Wi-Fi)";
    if ([deviceString isEqualToString:@"iPad16,2"])    return @"iPad mini(A17 Pro)(Wi-Fi+Cellular)";
    
    
    
    // 7.iPhone
    
    // 2010年9月 操作系统iOS 5.0
    if ([deviceString isEqualToString:@"iPhone3,1"])    return @"iPhone 4";
    if ([deviceString isEqualToString:@"iPhone3,2"])    return @"iPhone 4";
    if ([deviceString isEqualToString:@"iPhone3,3"])    return @"iPhone 4";
    
    // 2011年9月 操作系统iOS 5.0
    // iOS 10 and later is not supported.
    if ([deviceString isEqualToString:@"iPhone4,1"])    return @"iPhone 4S";
    
    // 2012年9月 操作系统iOS 6.0
    if ([deviceString isEqualToString:@"iPhone5,1"])    return @"iPhone 5";
    if ([deviceString isEqualToString:@"iPhone5,2"])    return @"iPhone 5";
    
    // 2013年 
    // 操作系统iOS 7.0
    if ([deviceString isEqualToString:@"iPhone5,3"])    return @"iPhone 5c";
    if ([deviceString isEqualToString:@"iPhone5,4"])    return @"iPhone 5c";
    
    if ([deviceString isEqualToString:@"iPhone6,1"])    return @"iPhone 5s";
    if ([deviceString isEqualToString:@"iPhone6,2"])    return @"iPhone 5s";
    
    // 2014年 iPhone 6、iPhone 6 Plus
    // 操作系统iOS 8.0
    if ([deviceString isEqualToString:@"iPhone7,2"])    return @"iPhone 6";
    if ([deviceString isEqualToString:@"iPhone7,1"])    return @"iPhone 6 Plus";
    
    // 2015年 iPhone 6s、iPhone 6s Plus、iPhone SE;
    // 操作系统iOS 9.0
    if ([deviceString isEqualToString:@"iPhone8,1"])    return @"iPhone 6s";
    if ([deviceString isEqualToString:@"iPhone8,2"])    return @"iPhone 6s Plus";
    if ([deviceString isEqualToString:@"iPhone8,4"])    return @"iPhone SE 1";
    
    // 2016年 iPhone 7、iPhone 7 Plus；
    // 操作系统iOS 10.0
    if ([deviceString isEqualToString:@"iPhone9,1"])    return @"iPhone 7";
    if ([deviceString isEqualToString:@"iPhone9,3"])    return @"iPhone 7";
    
    if ([deviceString isEqualToString:@"iPhone9,2"])    return @"iPhone 7 Plus";
    if ([deviceString isEqualToString:@"iPhone9,4"])    return @"iPhone 7 Plus";
    
    // 2017年 iPhone 8、iPhone 8 Plus、iPhone X；
    // 操作系统iOS 11.0
    if ([deviceString isEqualToString:@"iPhone10,1"])   return @"iPhone 8";
    if ([deviceString isEqualToString:@"iPhone10,4"])   return @"iPhone 8";
    
    if ([deviceString isEqualToString:@"iPhone10,2"])   return @"iPhone 8 Plus";
    if ([deviceString isEqualToString:@"iPhone10,5"])   return @"iPhone 8 Plus";
    
    if ([deviceString isEqualToString:@"iPhone10,3"])   return @"iPhone X";
    if ([deviceString isEqualToString:@"iPhone10,6"])   return @"iPhone X";
    
    // 2018年 iPhone XS、iPhone XS Max、iPhone XR ；
    // 操作系统iOS 12.0
    if ([deviceString isEqualToString:@"iPhone11,2"])  return @"iPhone XS";
    if ([deviceString isEqualToString:@"iPhone11,4"])  return @"iPhone XS Max";
    if ([deviceString isEqualToString:@"iPhone11,6"])  return @"iPhone XS Max";
    if ([deviceString isEqualToString:@"iPhone11,8"])  return @"iPhone XR";
    
    // 2019年9月；iPhone 11、iPhone 11 Pro、iPhone 11 Pro Max、iPhone SE 2代；
    // 操作系统iOS 13.0
    if ([deviceString isEqualToString:@"iPhone12,1"])  return @"iPhone 11";
    if ([deviceString isEqualToString:@"iPhone12,3"])  return @"iPhone 11 Pro";
    if ([deviceString isEqualToString:@"iPhone12,5"])  return @"iPhone 11 Pro Max";
    // 2020年3月
    if ([deviceString isEqualToString:@"iPhone12,8"])  return @"iPhone SE 2";
    
    // 2020年9月 iPhone 12 mini、iPhone 12、iPhone 12 Pro、iPhone 12 Pro Max；
    // 操作系统iOS 14.0
    if ([deviceString isEqualToString:@"iPhone13,2"])  return @"iPhone 12";
    if ([deviceString isEqualToString:@"iPhone13,1"])  return @"iPhone 12 mini";
    if ([deviceString isEqualToString:@"iPhone13,3"])  return @"iPhone 12 Pro";
    if ([deviceString isEqualToString:@"iPhone13,4"])  return @"iPhone 12 Pro Max";
    
    // 2021年9月 iPhone 13 mini、iPhone 13、iPhone 13 Pro、iPhone 13 Pro Max、Phone SE 3；
    // 操作系统iOS 15.0
    if ([deviceString isEqualToString:@"iPhone14,5"])  return @"iPhone 13";
    if ([deviceString isEqualToString:@"iPhone14,4"])  return @"iPhone 13 mini";
    if ([deviceString isEqualToString:@"iPhone14,2"])  return @"iPhone 13 Pro";
    if ([deviceString isEqualToString:@"iPhone14,3"])  return @"iPhone 13 Pro Max";
    // 2022年3月
    if ([deviceString isEqualToString:@"iPhone14,6"])  return @"iPhone SE 3";
    
    // 2022年9月 iPhone 14、iPhone 14 Plus、iPhone 14 Pro、iPhone 14 Pro Max；
    // 操作系统iOS 16.0
    if ([deviceString isEqualToString:@"iPhone14,7"])  return @"iPhone 14";
    if ([deviceString isEqualToString:@"iPhone14,8"])  return @"iPhone 14 Plus";
    if ([deviceString isEqualToString:@"iPhone15,2"])  return @"iPhone 14 Pro";
    if ([deviceString isEqualToString:@"iPhone15,3"])  return @"iPhone 14 Pro Max";

    // 2023年9月 iPhone 15、iPhone 15 Plus、iPhone 15 Pro、iPhone 15 Pro Max；
    // 操作系统iOS 17.0
    if ([deviceString isEqualToString:@"iPhone15,4"])  return @"iPhone 15";
    if ([deviceString isEqualToString:@"iPhone15,5"])  return @"iPhone 15 Plus";
    if ([deviceString isEqualToString:@"iPhone16,1"])  return @"iPhone 15 Pro";
    if ([deviceString isEqualToString:@"iPhone16,2"])  return @"iPhone 15 Pro Max";

    // 2024年9月 iPhone 16、（Plus、Pro、Pro Max、16e）；
    // 操作系统iOS 18.0
    if ([deviceString isEqualToString:@"iPhone17,3"])  return @"iPhone 16";
    if ([deviceString isEqualToString:@"iPhone17,4"])  return @"iPhone 16 Plus";
    if ([deviceString isEqualToString:@"iPhone17,1"])  return @"iPhone 16 Pro";
    if ([deviceString isEqualToString:@"iPhone17,2"])  return @"iPhone 16 Pro Max";
    if ([deviceString isEqualToString:@"iPhone17,5"])  return @"iPhone 16 e";
    
    // 8.iPod touch-第几代(不生产了)
    
    if ([deviceString isEqualToString:@"iPod1,1"])     return @"iPod Touch 1";
    if ([deviceString isEqualToString:@"iPod2,1"])     return @"iPod Touch 2";
    if ([deviceString isEqualToString:@"iPod3,1"])     return @"iPod Touch 3";
    if ([deviceString isEqualToString:@"iPod4,1"])     return @"iPod Touch 4";
    if ([deviceString isEqualToString:@"iPod5,1"])     return @"iPod Touch 5";
    if ([deviceString isEqualToString:@"iPod7,1"])     return @"iPod Touch 6";
    if ([deviceString isEqualToString:@"iPod9,1"])     return @"iPod Touch 7";
    
    
    
    // 9.Apple TV
    
    if ([deviceString isEqualToString:@"AppleTV1,1"])    return @"Apple TV 1";
    if ([deviceString isEqualToString:@"AppleTV2,1"])    return @"Apple TV 2";
    if ([deviceString isEqualToString:@"AppleTV3,1"])    return @"Apple TV 3";
    if ([deviceString isEqualToString:@"AppleTV3,2"])    return @"Apple TV 3";
    if ([deviceString isEqualToString:@"AppleTV5,3"])    return @"Apple TV HD";
    if ([deviceString isEqualToString:@"AppleTV6,2"])    return @"Apple TV 4K";
    // 2021年
    if ([deviceString isEqualToString:@"AppleTV11,1"])   return @"Apple TV 4K 2";
    // 2022年10月
    if ([deviceString isEqualToString:@"AppleTV14,1"])   return @"Apple TV 4K 3";

    
    // 10.MacBook
    
    // MacBook Air
    
    // 2022/2023年
    if ([deviceString isEqualToString:@"Mac14,2"])   return @"MacBook Air M2(13-inch,M2,2022)";
    if ([deviceString isEqualToString:@"Mac14,15"])   return @"MacBook Air M2(15-inch,M2,2023)";
    
    // 2024年
    // A3113
    if ([deviceString isEqualToString:@"Mac15,12"])   return @"MacBook Air M3(13-inch, 2024)";
    // A3114
    if ([deviceString isEqualToString:@"Mac15,13"])   return @"MacBook Air M3(15-inch, 2024)";
    
    // 2025年
    // A3240
    if ([deviceString isEqualToString:@"Mac16,12"])   return @"MacBook Air M4(13-inch)";
    // A3241
    if ([deviceString isEqualToString:@"Mac16,13"])   return @"MacBook Air M4(15-inch)";
    
    // MacBook Pro
    
    // 2020年
    if ([deviceString isEqualToString:@"MacBookPro17,1"])   return @"MacBook Pro M1(13-inch,M1,2020)";
    if ([deviceString isEqualToString:@"MacBookPro18,3(M1 Pro)"])   return @"MacBook Pro M1(14-inch,M1,2021)";
    if ([deviceString isEqualToString:@"MacBookPro18,4(M1 Max)"])   return @"MacBook Pro M1(14-inch,M1,2021)";
    if ([deviceString isEqualToString:@"MacBookPro18,1(M1 Pro)"])   return @"MacBook Pro M1(16-inch,M1,2021)";
    if ([deviceString isEqualToString:@"MacBookPro18,2(M1 Max)"])   return @"MacBook Pro M1(16-inch,M1,2021)";

    
    // 2022年
    if ([deviceString isEqualToString:@"Mac14,7"])   return @"MacBook Pro M2(13-inch)";
    
    if ([deviceString isEqualToString:@"Mac14,9"])   return @"MacBook Pro M2 Pro(14-inch,2023)";
    if ([deviceString isEqualToString:@"Mac14,5"])   return @"MacBook Pro M2 Max(14-inch,2023)";

    if ([deviceString isEqualToString:@"Mac14,10"])   return @"MacBook Pro M2 Pro(16-inch,2023)";
    if ([deviceString isEqualToString:@"Mac14,6"])   return @"MacBook Pro M2 Max(16-inch,2023)";

    
    // 2023年
    if ([deviceString isEqualToString:@"Mac15,3"])   return @"MacBook Pro M3(14-inch)";
    if ([deviceString isEqualToString:@"Mac15,6"])   return @"MacBook Pro M3 Pro(14-inch)";
    if ([deviceString isEqualToString:@"Mac15,8"])   return @"MacBook Pro M3 Max(14-inch)";
    if ([deviceString isEqualToString:@"Mac15,10"])   return @"MacBook Pro M3 Max(14-inch)";

    if ([deviceString isEqualToString:@"Mac15,7"])   return @"MacBook Pro M3 Pro(16-inch)";
    if ([deviceString isEqualToString:@"Mac15,9"])   return @"MacBook Pro M3 Max(16-inch)";
    if ([deviceString isEqualToString:@"Mac15,11"])   return @"MacBook Pro M3 Max(16-inch)";

    // 2024年
    if ([deviceString isEqualToString:@"Mac16,1(M4)"])   return @"MacBook Pro M4(14-inch)";
    if ([deviceString isEqualToString:@"Mac16,6(M4 Max)"])   return @"MacBook Pro M4(14-inch)";
    if ([deviceString isEqualToString:@"Mac16,8(M4 Pro)"])   return @"MacBook Pro M4(14-inch)";
    
    if ([deviceString isEqualToString:@"Mac16,5(M4 Max)"])   return @"MacBook Pro M4(16-inch)";
    if ([deviceString isEqualToString:@"Mac16,7(M4 Pro)"])   return @"MacBook Pro M4(16-inch)";

    
    return deviceString;
    
}

- (ZXDeviceModelType)zx_getDeviceModelType
{
    NSString *model = self.model;
    if ([model isEqualToString:@"iPhone"])
    {
        return ZXDeviceModelType_iPhone;
    }
    else if ([model isEqualToString:@"iPad"])
    {
        return ZXDeviceModelType_iPad;
    }
    return ZXDeviceModelType_iPodTouch;
}

@end
